#ifndef _IDENTIFIER_H_
#define _IDENTIFIER_H_

/*
	class : Identifier
	desc : Creates an identifier which is used
		to give a unique id to every instance
		of Identifier. Also gives the option of
		setting a programmer defined id which is
		useful for finds between threads and processes
		if the id isn't actually known allowing the code
		to be used in place of the id .
*/
class Identifier
{
	private:
		//total number of ids instantiated
		static unsigned int identifierNumber;
		//the id of the current program
		unsigned int id;
		//the id created by programmer
		unsigned int programmerId; //used by programmer to identify
	public:
		//default constructor
		Identifier();
		//constructor sets the programmer id
		Identifier(unsigned int programmerCode);
		//sets the programmer code
		void setCode(unsigned int code);
		//gets the programmer code
		unsigned int getCode();
		//gets the id of the identifier.
		unsigned int getID();
		//gets the total number of Identifiers declared.
		static unsigned int getIDNumber();
		
};

unsigned int Identifier::identifierNumber = 0;

//used to make more readable code using identifiers.
typedef Event Identifier;
typedef Resource Identifier;
typedef Owner Identifier;

#endif
